package devtype

import "yundian/internel/pkg/dingo"

type DeviceTypeAttr func(model *DeviceTypeModel)

type DeviceTypeAttrs []DeviceTypeAttr

func (attrFunc DeviceTypeAttrs) Apply(model *DeviceTypeModel)  {
	for _,f := range attrFunc {
		f(model)
	}
}

func WithCreateAt(createAt dingo.Time) DeviceTypeAttr {
	return func(model *DeviceTypeModel) { model.CreateAt = createAt }
}

func WithUpdateAt(updateAt dingo.Time) DeviceTypeAttr {
	return func(model *DeviceTypeModel) { model.UpdateAt = updateAt }
}